﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xtensive.Storage;
using Xtensive.Integrity.Aspects.Constraints;

namespace SMS.Core.Model.Data
{
    class Staff : Entity
    {

        [Key, Field]
        public int staff_id { get; private set; }

        [Field]
        public EntitySet<Cust_order> cust_orders { get; set; }//staff handles customer orders

        [Field]
        public EntitySet<Payment> payments { get; set; } 

        [Field(Length = 50)]
        public string first_name { get; set; }

        [Field(Length = 50)]
        public string last_name { get; set; }

        [Field(Length = 30)]
        public string position { get; set; }

        [Field(Precision = 2), RangeConstraint(Min = 0)]
        public decimal salary { get; set; }

        [Field(Length = 20)]
        public string account_type { get; set; }

        [Field(Length = 30)]
        public string username { get; set; }

        [Field(Length = 32)]
        public string pass_md5 { get; set; }
        //TODO: naa pay hire_date... ibutang pa?

    }
}
